home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
String
/
src
/
lower.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
434b
|
34 lines
#include "String.h"
#include <ctype.h>
RJS_String &RJS_String::lower()
{
int i, done=0;
for (i=0; i<length(); i++)
if (isupper(sd.data[i])) {
if (!done) done=1;
sd.data[i] = ToLower(sd.data[i]);
}
if (done) update();
return *this;
}
RJS_String lower(const RJS_String &s)
{
RJS_String temp(s);
temp.lower();
return temp;
}
RJS_String lower(const char *s)
{
RJS_String temp(s);
temp.lower();
return temp;
}